#include <stdio.h>

int main() {
	int num, a = 0, b = 0, c = 0, e = 0, f = 0;
	float d;
	while (scanf("%d", &num) && num != 0) {
		if (num % 15 == 0 || num % 21 == 0 || num % 35 == 0 || num % 105 == 0) {
			e++;
		} else if (num % 3 == 0) {
			a++;
		} else if (num % 5 == 0) {
			b++;
		} else if (num % 7 == 0) {
			c++;
		} else {
			f++;
		}
	}
	d = a + b + c + e + f;
	printf("%.2f%\n%.2f%\n%.2f%\n", a / d * 100, b / d * 100, c / d * 100);
	return 0;
}